home *** CD-ROM | disk | FTP | other *** search
- property snum, cnum, movestep, fallmode
- global diekidnum, firerectslist, fallironmode
-
- on birth me
- set snum to 3
- set cnum to the number of cast "kid_de"
- set the puppet of sprite snum to 1
- set the type of sprite snum to 1
- set the castNum of sprite snum to cnum
- set the foreColor of sprite snum to 255
- set the backColor of sprite snum to 0
- set the ink of sprite snum to 36
- set the locH of sprite snum to 232
- set the locV of sprite snum to 155
- set movestep to 6
- set fallmode to 0
- return me
- end
-
- on goleft me
- if the frame >= (label("help") - 1) then
- exit
- end if
- if fallmode then
- exit
- end if
- if diekidnum >= 3 then
- exit
- end if
- if the locV of sprite 1 <= 186 then
- set cnum to the number of cast "lWalk.loop"
- else
- set cnum to the number of cast "uWalk.loop"
- end if
- set the castNum of sprite snum to cnum
- set movestep to 6
- set tlh to the locH of sprite 1
- set maxwidth to getkidmovewidth(the locV of sprite 1)
- if the frame mod 2 then
- set the locH of sprite 1 to tlh + 4
- if item 1 of maxwidth < the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 1 of maxwidth)
- else
- if fallironmode <> 0 then
- set the locH of sprite fallironmode to the locH of sprite fallironmode + 4
- end if
- end if
- end if
- end
-
- on goright me
- if the frame >= (label("help") - 1) then
- exit
- end if
- if fallmode then
- exit
- end if
- if diekidnum >= 3 then
- exit
- end if
- if the locV of sprite 1 <= 186 then
- set cnum to the number of cast "rWalk.loop"
- else
- set cnum to the number of cast "uWalk.loop"
- end if
- set the castNum of sprite snum to cnum
- set movestep to 6
- set tlh to the locH of sprite 1
- set maxwidth to getkidmovewidth(the locV of sprite 1)
- if the frame mod 2 then
- set the locH of sprite 1 to tlh - 4
- if item 2 of maxwidth > the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 2 of maxwidth)
- else
- if fallironmode <> 0 then
- set the locH of sprite fallironmode to the locH of sprite fallironmode - 4
- end if
- end if
- end if
- end
-
- on goup me
- if the frame >= (label("help") - 1) then
- exit
- end if
- if fallmode then
- exit
- end if
- if diekidnum >= 3 then
- exit
- end if
- set cnum to the number of cast "uWalk.loop"
- set the castNum of sprite snum to cnum
- set movestep to 6
- set tlv to the locV of sprite 1
- if the frame mod 2 then
- set the locV of sprite 1 to tlv + 4
- if the locV of sprite 1 > 675 then
- set the locV of sprite 1 to 675
- end if
- set maxwidth to getkidmovewidth(the locV of sprite 1)
- if item 2 of maxwidth > the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 2 of maxwidth)
- else
- if item 1 of maxwidth < the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 1 of maxwidth)
- end if
- end if
- end if
- end
-
- on godown me
- if the frame >= (label("help") - 1) then
- exit
- end if
- if fallmode then
- exit
- end if
- if diekidnum >= 3 then
- exit
- end if
- set cnum to the number of cast "uWalk.loop"
- set the castNum of sprite snum to cnum
- set movestep to 6
- set tlv to the locV of sprite 1
- if the frame mod 2 then
- set the locV of sprite 1 to tlv - 4
- if the locV of sprite 1 < 155 then
- set the locV of sprite 1 to 155
- end if
- set maxwidth to getkidmovewidth(the locV of sprite 1)
- if item 2 of maxwidth > the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 2 of maxwidth)
- else
- if item 1 of maxwidth < the locH of sprite 1 then
- set the locH of sprite 1 to integer(item 1 of maxwidth)
- end if
- end if
- end if
- end
-
- on checkfire me
- if the optionDown then
- alert(the loc of sprite 1 && count(firerectslist) & RETURN & firerectslist)
- exit
- end if
- if the frame >= (label("help") - 1) then
- exit
- end if
- if fallmode then
- exit
- end if
- if diekidnum >= 3 then
- exit
- end if
- set cnum to the number of cast "hanm.loop"
- set the castNum of sprite snum to cnum
- set movestep to 6
- end
-
- on stopkid me
- if fallmode then
- fallkid(me)
- exit
- end if
- if cnum = the number of cast "kid_de" then
- exit
- end if
- set movestep to movestep - 1
- if movestep <= 0 then
- if cnum = the number of cast "hanm.loop" then
- checkfirerect()
- end if
- set cnum to the number of cast "kid_back"
- set the castNum of sprite snum to cnum
- end if
- end
-
- on setfallkid me
- set cnum to the number of cast "kid_fall"
- set the castNum of sprite snum to cnum
- set fallmode to 1
- puppetSound("ops")
- end
-
- on fallkid me
- set tlv to the locV of sprite 1
- set tlv to tlv - 8
- set the locV of sprite 1 to tlv
- if tlv <= 155 then
- set fallmode to 0
- set cnum to the number of cast "kid_die"
- set the castNum of sprite snum to cnum
- puppetSound("hit")
- set diekidnum to diekidnum + 1
- set the puppet of sprite (29 + diekidnum) to 1
- set the blend of sprite (29 + diekidnum) to 30
- updateStage()
- wait(30)
- set the locV of sprite fallironmode to -40
- set fallironmode to 0
- if diekidnum < 3 then
- set cnum to the number of cast "kid_de"
- set the castNum of sprite snum to cnum
- else
- showscore()
- end if
- end if
- end
-